<template>
	<div>
		<Header title="终端财务收银汇总"></Header>
		<div class="Order">
			<operate
				:isAddShow="isAddShow"
				:isSeniorShow="isSeniorShow"
                placeholder='日期'
			></operate>
			<table cellspacing="0">
				<tr>
					<th>日期</th>
					<th>支付宝笔数</th>
					<th>支付宝金额</th>
					<th>微信笔数</th>
					<th>微信金额</th>
					<th>银行卡笔数</th>
					<th>银行卡金额</th>
					<th>现金笔数</th>
					<th>现金金额</th>
					<th>抹零笔数</th>
				</tr>
				<tr v-for="item in retailList" :key="item.id">
                    <td>{{item.date}}</td>
                    <td>{{item.zfbNum}}</td>
                    <td>{{item.zfbPrice}}</td>
                    <td>{{item.WechatNum}}</td>
                    <td>{{item.WechatPrice}}</td>
                    <td>{{item.cartNum}}</td>
                    <td>{{item.cartPrice}}</td>
                    <td>{{item.xjNum}}</td>
                    <td>{{item.xjPrice}}</td>
                    <td>{{item.wipeNum}}</td>
                </tr>
				<tr>
					<td colspan="10" style="border:0;color:#000">
						<Footer></Footer>
					</td>
				</tr>
			</table>
		</div>
	</div>
</template>
<script>
import Header from "@/components/member/header"
import Footer from "@/components/member/footer"
import operate from "@/components/member/operate"
export default {
	data(){
        return {
            isAddShow:false,
            isSeniorShow:true,
            retailList:[],
        }
    },
    methods:{
    },
    components:{
        Footer,
        Header,
        operate
    },
    created(){
        this.$http.post('http://120.76.56.2:3000/retail/CashierSummary/get').then((res)=>{
            this.retailList = res.data
            this.$store.commit("common/setTotalNums",res.count);
            this.$store.commit("common/setTotalPages",res.pages);
        })
    },
    computed: {
        listData() {
            return this.$store.state.common.setCode;
        },
        listPage(){
            return this.$store.state.common.nowPage;
        }
    },
    watch:{
        listData(val) {
            this.$http.post('http://120.76.56.2:3000/retail/CashierSummary/get',{
                code:this.$store.state.common.code
            }).then((res)=>{
                this.retailList = res.data
            })
        },
        listPage(page){
            this.$http.post('http://120.76.56.2:3000/retail/CashierSummary/get',{
                page
            }).then((res)=>{
                this.retailList = res.data
            })
        }
    }
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/table.scss";
</style>
